<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>开班信息与活动</title>
    <script src="https://cdn.tailwindcss.com/3.3.3"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
    <style>
        body {
            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
            max-width: 750px;
            margin: 0 auto;
            background-color: #f7f8fa;
        }
        .tab-active {
            color: #4f46e5;
            border-bottom: 3px solid #4f46e5;
        }
        .status-active {
            background-color: #4f46e5;
            color: white;
        }
        .status-inactive {
            background-color: #e5e7eb;
            color: #6b7280;
        }
        .course-card {
            transition: all 0.2s ease;
        }
        .course-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        }
    </style>
</head>
<body class="text-gray-800">
    <!-- 顶部导航 -->
    <header class="bg-white shadow-sm sticky top-0 z-10">
        <div class="flex items-center px-4 py-3">
            <button class="text-gray-600 mr-2">
                <i class="fas fa-chevron-left text-lg"></i>
            </button>
            <h1 class="text-xl font-semibold flex-1 text-center">开班信息与活动</h1>
            <div class="w-6"></div> <!-- 占位保持标题居中 -->
        </div>
        
        <!-- 搜索框 -->
        <div class="px-4 pb-3">
            <div class="relative">
                <input type="text" placeholder="搜索课程或活动" class="w-full py-2 pl-10 pr-4 bg-gray-100 rounded-full focus:outline-none focus:ring-2 focus:ring-indigo-500">
                <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
            </div>
        </div>
    </header>

    <!-- 筛选区 -->
    <div class="bg-white px-4 py-3 flex items-center border-b border-gray-100">
        <div class="flex-1 mr-2">
            <div class="relative">
                <select class="w-full py-2 pl-3 pr-8 bg-gray-100 rounded-md appearance-none focus:outline-none focus:ring-2 focus:ring-indigo-500">
                    <option>全部课程类型</option>
                    <option>保洁服务</option>
                    <option>月嫂培训</option>
                    <option>育儿嫂</option>
                    <option>老人护理</option>
                </select>
                <i class="fas fa-chevron-down absolute right-3 top-3 text-gray-400 pointer-events-none"></i>
            </div>
        </div>
        <div class="flex-1">
            <div class="relative">
                <select class="w-full py-2 pl-3 pr-8 bg-gray-100 rounded-md appearance-none focus:outline-none focus:ring-2 focus:ring-indigo-500">
                    <option>全部时间</option>
                    <option>本周</option>
                    <option>本月</option>
                    <option>下月</option>
                </select>
                <i class="fas fa-chevron-down absolute right-3 top-3 text-gray-400 pointer-events-none"></i>
            </div>
        </div>
    </div>

    <!-- 标签切换 -->
    <div class="bg-white flex border-b border-gray-100">
        <button id="tab-class" class="flex-1 py-3 font-medium text-center tab-active">
            近期开班
        </button>
        <button id="tab-event" class="flex-1 py-3 font-medium text-center text-gray-500">
            活动通知
        </button>
    </div>

    <!-- 开班信息列表 -->
    <div id="class-list" class="px-4 py-3 space-y-4">
        <!-- 课程卡片1 -->
        <div class="course-card bg-white rounded-lg overflow-hidden shadow">
            <div class="flex">
                <img src="https://s.coze.cn/image/rlpizDeDo6Q/" alt="课程封面" class="w-24 h-24 object-cover">
                <div class="flex-1 p-3">
                    <h3 class="font-semibold text-lg mb-1">高级保洁服务培训</h3>
                    <div class="flex items-center text-sm text-gray-500 mb-1">
                        <i class="far fa-calendar-alt mr-1"></i>
                        <span>2024-06-15 至 2024-06-20</span>
                    </div>
                    <div class="flex items-center text-sm text-gray-500 mb-2">
                        <i class="fas fa-map-marker-alt mr-1"></i>
                        <span>北京市朝阳区家政培训中心</span>
                    </div>
                    <div class="flex justify-between items-center">
                        <div>
                            <span class="text-red-500 font-bold">¥1280</span>
                            <span class="text-sm text-gray-500 ml-1">/人</span>
                        </div>
                        <span class="text-sm text-gray-500">剩余名额: 12人</span>
                    </div>
                </div>
            </div>
            <div class="flex border-t border-gray-100">
                <button class="flex-1 py-2 text-center text-indigo-600 border-r border-gray-100">
                    <i class="fas fa-headphones mr-1"></i>预约试听
                </button>
                <button class="flex-1 py-2 text-center bg-indigo-600 text-white">
                    <i class="fas fa-pen mr-1"></i>立即报名
                </button>
            </div>
        </div>

        <!-- 课程卡片2 -->
        <div class="course-card bg-white rounded-lg overflow-hidden shadow">
            <div class="flex">
                <img src="https://s.coze.cn/image/XjOWjo7efD8/" alt="课程封面" class="w-24 h-24 object-cover">
                <div class="flex-1 p-3">
                    <h3 class="font-semibold text-lg mb-1">金牌月嫂专业培训</h3>
                    <div class="flex items-center text-sm text-gray-500 mb-1">
                        <i class="far fa-calendar-alt mr-1"></i>
                        <span>2024-06-25 至 2024-07-05</span>
                    </div>
                    <div class="flex items-center text-sm text-gray-500 mb-2">
                        <i class="fas fa-map-marker-alt mr-1"></i>
                        <span>上海市浦东新区家政学院</span>
                    </div>
                    <div class="flex justify-between items-center">
                        <div>
                            <span class="text-red-500 font-bold">¥2980</span>
                            <span class="text-sm text-gray-500 ml-1">/人</span>
                        </div>
                        <span class="text-sm text-gray-500">剩余名额: 5人</span>
                    </div>
                </div>
            </div>
            <div class="flex border-t border-gray-100">
                <button class="flex-1 py-2 text-center text-indigo-600 border-r border-gray-100">
                    <i class="fas fa-headphones mr-1"></i>预约试听
                </button>
                <button class="flex-1 py-2 text-center bg-indigo-600 text-white">
                    <i class="fas fa-pen mr-1"></i>立即报名
                </button>
            </div>
        </div>

        <!-- 课程卡片3 -->
        <div class="course-card bg-white rounded-lg overflow-hidden shadow">
            <div class="flex">
                <img src="https://s.coze.cn/image/iiW5tSOvi5E/" alt="课程封面" class="w-24 h-24 object-cover">
                <div class="flex-1 p-3">
                    <h3 class="font-semibold text-lg mb-1">老人护理专业技能培训</h3>
                    <div class="flex items-center text-sm text-gray-500 mb-1">
                        <i class="far fa-calendar-alt mr-1"></i>
                        <span>2024-07-10 至 2024-07-15</span>
                    </div>
                    <div class="flex items-center text-sm text-gray-500 mb-2">
                        <i class="fas fa-map-marker-alt mr-1"></i>
                        <span>广州市天河区护理培训中心</span>
                    </div>
                    <div class="flex justify-between items-center">
                        <div>
                            <span class="text-red-500 font-bold">¥1580</span>
                            <span class="text-sm text-gray-500 ml-1">/人</span>
                        </div>
                        <span class="text-sm text-gray-500">剩余名额: 8人</span>
                    </div>
                </div>
            </div>
            <div class="flex border-t border-gray-100">
                <button class="flex-1 py-2 text-center text-indigo-600 border-r border-gray-100">
                    <i class="fas fa-headphones mr-1"></i>预约试听
                </button>
                <button class="flex-1 py-2 text-center bg-indigo-600 text-white">
                    <i class="fas fa-pen mr-1"></i>立即报名
                </button>
            </div>
        </div>

        <!-- 加载更多 -->
        <button class="w-full py-3 bg-white rounded-lg shadow text-gray-600 font-medium">
            <i class="fas fa-sync-alt mr-1"></i>加载更多
        </button>
    </div>

    <!-- 活动通知列表 (默认隐藏) -->
    <div id="event-list" class="px-4 py-3 space-y-4 hidden">
        <!-- 活动1 -->
        <div class="bg-white rounded-lg overflow-hidden shadow">
            <div class="p-4">
                <div class="flex justify-between items-start mb-2">
                    <span class="px-2 py-1 bg-indigo-100 text-indigo-600 text-xs rounded-full">行业峰会</span>
                    <span class="px-2 py-1 text-xs rounded-full status-active">进行中</span>
                </div>
                <h3 class="font-semibold text-lg mb-2">2024家政服务行业发展峰会</h3>
                <div class="flex items-center text-sm text-gray-500 mb-3">
                    <i class="far fa-calendar-alt mr-1"></i>
                    <span>2024-06-20 至 2024-06-22</span>
                </div>
                <p class="text-gray-600 text-sm mb-3">本次峰会将邀请行业专家、企业代表共同探讨家政服务行业发展趋势、标准化建设及人才培养等议题...</p>
                <button class="w-full py-2 text-center border border-indigo-600 text-indigo-600 rounded-md">
                    查看详情
                </button>
            </div>
        </div>

        <!-- 活动2 -->
        <div class="bg-white rounded-lg overflow-hidden shadow">
            <div class="p-4">
                <div class="flex justify-between items-start mb-2">
                    <span class="px-2 py-1 bg-green-100 text-green-600 text-xs rounded-full">优惠活动</span>
                    <span class="px-2 py-1 text-xs rounded-full status-active">进行中</span>
                </div>
                <h3 class="font-semibold text-lg mb-2">暑期培训课程限时优惠</h3>
                <div class="flex items-center text-sm text-gray-500 mb-3">
                    <i class="far fa-calendar-alt mr-1"></i>
                    <span>2024-06-15 至 2024-08-31</span>
                </div>
                <p class="text-gray-600 text-sm mb-3">暑期特惠！报名任意培训课程立减200元，三人组团报名每人再减100元，名额有限，先到先得...</p>
                <button class="w-full py-2 text-center border border-indigo-600 text-indigo-600 rounded-md">
                    查看详情
                </button>
            </div>
        </div>

        <!-- 活动3 -->
        <div class="bg-white rounded-lg overflow-hidden shadow">
            <div class="p-4">
                <div class="flex justify-between items-start mb-2">
                    <span class="px-2 py-1 bg-purple-100 text-purple-600 text-xs rounded-full">就业推荐</span>
                    <span class="px-2 py-1 text-xs rounded-full status-inactive">已结束</span>
                </div>
                <h3 class="font-semibold text-lg mb-2">优秀学员就业推荐会</h3>
                <div class="flex items-center text-sm text-gray-500 mb-3">
                    <i class="far fa-calendar-alt mr-1"></i>
                    <span>2024-05-28 至 2024-05-30</span>
                </div>
                <p class="text-gray-600 text-sm mb-3">本次推荐会为优秀学员提供与知名家政企业面对面交流机会，已有30家企业提供200+就业岗位...</p>
                <button class="w-full py-2 text-center border border-gray-400 text-gray-400 rounded-md">
                    查看详情
                </button>
            </div>
        </div>

        <!-- 加载更多 -->
        <button class="w-full py-3 bg-white rounded-lg shadow text-gray-600 font-medium">
            <i class="fas fa-sync-alt mr-1"></i>加载更多
        </button>
    </div>

    <!-- 底部导航 -->
    <footer class="fixed bottom-0 left-0 right-0 bg-white shadow-lg border-t border-gray-200 max-w-750 mx-auto">
        <div class="flex justify-around py-2">
            <a href="#" class="flex flex-col items-center text-indigo-600">
                <i class="fas fa-home text-xl"></i>
                <span class="text-xs mt-1">首页</span>
            </a>
            <a href="#" class="flex flex-col items-center text-gray-500">
                <i class="fas fa-graduation-cap text-xl"></i>
                <span class="text-xs mt-1">商学院</span>
            </a>
            <a href="#" class="flex flex-col items-center text-gray-500">
                <i class="fas fa-user-friends text-xl"></i>
                <span class="text-xs mt-1">社区</span>
            </a>
            <a href="#" class="flex flex-col items-center text-gray-500">
                <i class="fas fa-user text-xl"></i>
                <span class="text-xs mt-1">我的</span>
            </a>
        </div>
    </footer>

    <script>
        // 标签切换功能
        document.getElementById('tab-class').addEventListener('click', function() {
            document.getElementById('tab-class').classList.add('tab-active');
            document.getElementById('tab-class').classList.remove('text-gray-500');
            document.getElementById('tab-event').classList.remove('tab-active');
            document.getElementById('tab-event').classList.add('text-gray-500');
            document.getElementById('class-list').classList.remove('hidden');
            document.getElementById('event-list').classList.add('hidden');
        });

        document.getElementById('tab-event').addEventListener('click', function() {
            document.getElementById('tab-event').classList.add('tab-active');
            document.getElementById('tab-event').classList.remove('text-gray-500');
            document.getElementById('tab-class').classList.remove('tab-active');
            document.getElementById('tab-class').classList.add('text-gray-500');
            document.getElementById('event-list').classList.remove('hidden');
            document.getElementById('class-list').classList.add('hidden');
        });

        // 模拟加载更多功能
        document.querySelectorAll('button').forEach(btn => {
            if(btn.textContent.includes('加载更多')) {
                btn.addEventListener('click', function() {
                    const loadingText = '<i class="fas fa-spinner fa-spin mr-1"></i>加载中...';
                    const originalText = this.innerHTML;
                    this.innerHTML = loadingText;
                    
                    // 模拟异步加载
                    setTimeout(() => {
                        this.innerHTML = originalText;
                        alert('已加载更多内容');
                    }, 1000);
                });
            }
        });
    </script>
</body>
</html>